package com.yc.pay.mapper;

import com.yc.pay.model.PaySerial;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PaySerialMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PaySerial record);

    int insertSelective(PaySerial record);

    PaySerial selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PaySerial record);

    int updateByPrimaryKey(PaySerial record);

    /** SELECT * FROM  PaySerial WHERE MCHORDERno IN (0,1,2)
     * 根据商户订单号查询
     * @param mchOrderNo
     * @return
     */
    List<PaySerial> queryByMchOrderNo(@Param("mchOrderNo")String mchOrderNo);

    /**
     * 根据支付流水号查询
     * @param outTradeNo
     * @return
     */
    PaySerial queryByPaySerialNo(@Param("outTradeNo")String outTradeNo);

}